package day01;

import lombok.*;

@AllArgsConstructor
@NoArgsConstructor
@ToString
@Setter
@Getter
public class Order implements Comparable<Order>{
    private String order_id;
    private String order_sn;
    private String goods_id;
    private String category_id;
    private int goods_number;
    private double price;

    @Override
    public int compareTo(Order o) {
        return Double.compare(o.goods_number*o.price,this.goods_number*this.price);
    }
}
